<form class="reset-password-container" nz-form [formGroup]="forms" (ngSubmit)="submitForm($event)">

  <div class="reset-password-info">
    <nz-alert [nzType]="'info'" [nzMessage]="'密码修改成功后，您需要重新登录！'" nzShowIcon></nz-alert>
  </div>

  <div nz-form-item nz-row>
    <div nz-form-label nz-col [nzSpan]="6">
      <label nz-form-item-required>当前密码</label>
    </div>
    <div nz-form-control nz-col [nzSpan]="14" nzHasFeedback>
      <nz-input [nzType]="'password'" [nzSize]="'large'" formControlName="oldPassword" (ngModelChange)="updateConfirmValidator()"></nz-input>
      <div nz-form-explain *ngIf="formErrors.oldPassword">{{formErrors.oldPassword}}</div>
    </div>
  </div>

  <div nz-form-item nz-row>
    <div nz-form-label nz-col [nzSpan]="6">
      <label nz-form-item-required>新密码</label>
    </div>
    <div nz-form-control nz-col [nzSpan]="14" nzHasFeedback>
      <nz-input [nzType]="'password'" [nzSize]="'large'" formControlName="newPassword"></nz-input>
      <div nz-form-explain *ngIf="formErrors['newPassword']">{{formErrors['newPassword']}}</div>
    </div>
  </div>


  <div class="footer">
    <nz-tooltip [nzTitle]="'密码可由6~20位数字、大小写字母以及特殊符号!@#$%^&*()_组成！'" style="margin-right: 15px">
      <span nz-tooltip><i class="anticon anticon-question-circle-o"></i></span>
    </nz-tooltip>
    <button type="button" nz-button [nzType]="'default'" [nzSize]="'large'" [disabled]="loading" (click)="cancel()">取消</button>
    <button nz-button [nzType]="'primary'" [nzSize]="'large'" [nzLoading]="loading">确定</button>
  </div>
</form>